home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
bipl.zip
/
PROCS.ZIP
/
PROCKIND.ICN
< prev
next >
Wrap
Text File
|
1992-09-28
|
915b
|
37 lines
############################################################################
#
# File: prockind.icn
#
# Subject: Procedure to produce code according to kind of procedure
#
# Author: Ralph E. Griswold
#
# Date: September 17, 1992
#
###########################################################################
#
# prockind(p) produces a code for the kind of the procedure p as follows:
#
# "p" (declared) procedure
# "f" (built-in) function
# "o" operator
# "c" record constructor
#
# It fails if p is not of type procedure.
#
############################################################################
procedure prockind(p)
if type(p) ~== "procedure" then fail
image(p) ? {
if find("procedure") then return "p"
if find("record constructor") then return "c"
="function "
if upto(&letters) then return "f" else return "o"
}
end